#ifndef __CLIENTMETRIC_HPP__
#define __CLIENTMETRIC_HPP__

#include <cstdint>
#include <string>
#include <tuple>
#include <vector>
#include <map>

namespace metrics
{
    struct ClientMetric
    {
        // Label
        std::map<std::string, std::string> labels;

        // Counter
        struct Counter
        {
            double value = 0.0;
        };
        Counter counter;

        // Gauge
        struct Gauge
        {
            double value = 0.0;
        };
        Gauge gauge;

        // Summary
        struct Quantile
        {
            double quantile = 0.0;
            double value = 0.0;
        };
        struct Summary
        {
            std::uint64_t sample_count = 0;
            double sample_sum = 0.0;
            std::vector<Quantile> quantile;
        };
        Summary summary;

        // Histogram
        struct Bucket
        {
            std::uint64_t cumulative_count = 0;
            double upper_bound = 0.0;
        };

        struct Histogram
        {
            std::uint64_t sample_count = 0;
            double sample_sum = 0.0;
            std::vector<Bucket> buckets;
        };
        Histogram histogram;

        // Untyped
        struct Untyped
        {
            double value = 0;
        };
        Untyped untyped;
    };

} // namespace metrics

#endif // __CLIENTMETRIC_HPP__